/*
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Classes;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.GridLayout;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * Fenetre de gestion de l'ERP
 * @author ZwoRmi
 */
public class GestionERP {
    private JFrame _frame;
    public GestionERP(){
        this.init();
    }

    private void init() {
        _frame = new JFrame();
        this.initFrame();
    }

    private void initFrame() {
        
        _frame.setBackground(Color.white);
        _frame.setResizable(true);
        _frame.setSize(500, 200);
        _frame.setLocationRelativeTo(null);
        _frame.setTitle("ZwoD, votre ERP Restaurant");
        _frame.setLayout(new BorderLayout());
        _frame.add(creerPanelNord(), "North");
       // _frame.add(creerPanelCentre(), "Center");
       // _frame.add(creerPanelSud(), "South");
        _frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        _frame.setVisible(true);
    }

    private JPanel creerPanelNord() {
        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());
        JLabel image = new JLabel(new ImageIcon("C:\\Users\\userinsta\\Documents\\NetBeansProjects\\trunk\\ProjetLucasDany\\images\\LogoLittle.png"));
        panel.add(image, BorderLayout.LINE_START);
        panel.add(new JLabel("      "));
        JPanel panelTitre = new JPanel();
        panelTitre.setLayout(new GridLayout());
        String s = Marque.getInstance().getNom();
        panelTitre.add(new JLabel(s));
        panel.add(panelTitre, BorderLayout.CENTER);
        panel.setBackground(Color.white);
        JPanel panelCombo = new JPanel();
        JComboBox jComboBox1 = new JComboBox();
        jComboBox1.addItem(Marque.getInstance().getRestaurants().get(0).getNom());
        panelCombo.add(jComboBox1);
        panel.add(panelCombo, BorderLayout.LINE_END);
        return panel;
    }

    private JPanel creerPanelCentre() {
        JPanel panel = new JPanel();
        
        return panel;
    }

    private JPanel creerPanelSud() {
        JPanel panel = new JPanel();
        
        return panel;
    }
}
